<?php
/*
Description: This file is used to change login paassword.
*/
#########IncludeFiles####################################################################################
include_once '../inc/config.php';
include_once("../inc/bootstrape.php");
require_once _SITE_PATH_.'classes/Vendor/Vendor.php';
require_once _SITE_PATH_.'classes/Venue/Venue.php';
require_once _SITE_PATH_.'classes/CommonUtility/CommonUtility.php';


//    CHANGE PASSWORD    CODE    //           
if( $_POST['submit']=='Submit')
{    
    $parms['vendor_id'] = $_POST['vendor'];
    $parms['fixed_cost_items'] = @implode(',',$_POST['fixed_cost_items']);
    $parms['variable_cost_items'] = @implode(',',$_POST['variable_cost_items']);
    $parms['venue_id'] = $_POST['venue'];
    $parms['name'] = $_POST['name'];
    $parms['from_date'] = $_POST['from_date'];
    $parms['to_date'] = $_POST['to_date'];
    //$parms['cost_type'] = $_POST['cost_type'];
    $parms['total_cost'] = $_POST['total_cost'];
    $parms['no_of_people'] = $_POST['no_of_people'];
    $parms['per_person_cost'] = $_POST['per_person_cost'];
    $parms['discount'] = $_POST['discount'];
    $parms['discount_type'] = $_POST['discount_type'];
    $parms['surcharge'] = $_POST['surcharge'];
    $parms['surcharge_type'] = $_POST['surcharge_type'];
    $parms['tax_rate'] = $_POST['tax_rate'];
    $parms['booking_amount'] = $_POST['booking_amount'];
    $parms['cancellation_policy'] = $_POST['cancellation_policy'];
    $parms['tc_policy'] = $_POST['tc_policy'];
    $parms['added'] = date("Y-m-d");
            
    if(CommonUtility::insertData($parms, 'venue_tariff')){        
        header("Location: venuetariff_mng.php?msg=1774");            
        exit;
    }
    $err = 1775;    
}

$venues = Venue::getActiveVenues();

$errMsg = $err;
$_tplName = 'venue/venuetariff_add.tpl';
$_title = 'Add Venue Tariff';

//  calender js include
$_extraJS[] = _SITE_URL_ . 'lib/calender/js/cal.js';
require_once _ADMIN_TPL_MAIN_;
?>